import java.util.Date;
import java.util.concurrent.Callable;

/**
 * @author 军哥
 * @version 1.0
 * @description: SendEmailTask
 * @date 2023/5/10 14:33
 */

public class SendEmailTask implements Callable<Long> {

    private String address;
    private String title;
    private String body;

    SendEmailTask(String address, String title, String body) {
        this.address = address;
        this.title = title;
        this.body = body;
    }

    @Override
    public Long call() throws Exception {

        return sendEmail();
    }

    /**
     * @description 发送邮件函数
     * @author 军哥
     * @date 2023/5/10 14:37
     * @version 1.0
     */
    private Long sendEmail() {

        System.out.println(Thread.currentThread().getName()+",title:"+title);

        return new Date().getTime();
    }
}
